<?php
/**
 * Created by PhpStorm.
 * User: DELL
 * Date: 2017/1/20
 * Time: 21:55
 */
namespace common\models;

use Yii;
use yii\base\NotSupportedException;
use yii\db\ActiveRecord;

class Toutiao extends ActiveRecord
{

    const STATUS_DELETED = 0;
    const STATUS_ACTIVE = 1;

    public static function tableName()
    {
        return '{{%info_list}}';
    }

    public static function findByGroupId($group_id)
    {
       return static::findOne(['group_id' => $group_id, 'status' => self::STATUS_ACTIVE]);
    }
}